package com.service.impl;

import com.bean.Record;
import com.bean.User;
import com.dao.RecordDao;
import com.dao.impl.RecordDaoImpl;
import com.service.RecordService;

import java.util.List;

public class RecordServiceImpl implements RecordService {
    private RecordDao recordDao = new RecordDaoImpl();
    @Override
    public int addRecord( User user) {
        return recordDao.addRecord(user);
    }

    @Override
    public List<Record> getAllRecord() {
        return recordDao.getAllRecord();
    }

    public List<Record> findRecords(String startDate,String endDate){
        return recordDao.findRecords(startDate,endDate);
    };
}
